package com.henary.annotation.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

/**
 * @author henary
 * @date 2022年09月19日 16:18
 */
@PropertySource(value = "classpath:school.properties")
@Component
public class Shcool {
	@Value("${name}")
	private String name;
	@Value("${address}")
	private String address;
	@Autowired
	Environment env;
	public Shcool(String name, String address) {
		this.name = name;
		this.address = address;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Shcool() {
	}

	@Override
	public String toString() {
		return "Shcool{" +
				"name='" + name + '\'' +
				", address='" + address + '\'' +
				'}';
	}
}
